home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / TVPSCALE.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  2KB  |  54 lines

  1. /*================================================*/
  2. /* TVPSCALE.C                                     */
  3. /*                                                */
  4. /* (c) Copyright 1988 Ralf Brown                  */
  5. /*     All Rights Reserved                        */
  6. /* May be freely copied for noncommercial use as  */
  7. /* long as this copyright notice is kept intact   */
  8. /* and any changes are indicated in the comment   */
  9. /* blocks for the functions                       */
  10. /*================================================*/
  11.  
  12. #include "tvapi.h"
  13.  
  14. /*================================================*/
  15. /* TVptr_setscale  set pointer scale factors      */
  16. /*                 pointer coords scaled so that  */
  17. /*                 bottom edge of window is "rows"*/
  18. /*                 and right edge is "cols"       */
  19. /*   Ralf Brown 6/13/88                           */
  20. /*================================================*/
  21.  
  22. void pascal TVptr_setscale(OBJECT ptr,int rows,int cols)
  23. {
  24.    PARMLIST2 p ;
  25.  
  26.    if (TVisobj(ptr))
  27.       {
  28.       p.num_args = 2 ;
  29.       p.arg[0] = rows ;
  30.       p.arg[1] = cols ;
  31.       TVsendmsg(SETSCALE_MSG, TOS, ptr, (PARMLIST *)&p) ;
  32.       }
  33. }
  34.  
  35. /*================================================*/
  36. /* TVptr_getscale  get pointer scale factors      */
  37. /*   Ralf Brown 6/13/88                           */
  38. /*================================================*/
  39.  
  40. void pascal TVptr_getscale(OBJECT ptr,int *rows,int *cols)
  41. {
  42.    PARMLIST2 p ;
  43.  
  44.    if (TVisobj(ptr))
  45.       {
  46.       p.num_args = 0 ;
  47.       TVsendmsg(GETSCALE_MSG, TOS, ptr, (PARMLIST *)&p) ;
  48.       *rows = (int) p.arg[0] ;
  49.       *cols = (int) p.arg[1] ;
  50.       }
  51. }
  52.  
  53. /* End of TVPSCALE.C */
  54.